<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Voodoo Shader Framework: K:/VoodooShader/Framework/Logger.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>K:/VoodooShader/Framework/Logger.cpp</h1><a href="_logger_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/**************************************************************************\</span>
<a name="l00002"></a>00002 <span class="comment">                                This file is part of the NWShader Project.</span>
<a name="l00003"></a>00003 <span class="comment">                                        Copyright (c) 2010 by Sean &quot;peachykeen&quot; Sube</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">                This project, as well as any source code and binary     distributions,</span>
<a name="l00006"></a>00006 <span class="comment">                is licensed under the GNU General Public License. All terms and</span>
<a name="l00007"></a>00007 <span class="comment">                restrictions of that license apply to all elements of the NWShader</span>
<a name="l00008"></a>00008 <span class="comment">                Project. Under no circumstances may any element of NWShader be</span>
<a name="l00009"></a>00009 <span class="comment">                used in any proprietary project. Please refer to the copy of the</span>
<a name="l00010"></a>00010 <span class="comment">                GPL distributed with NWShader for further information.</span>
<a name="l00011"></a>00011 <span class="comment">\**************************************************************************/</span>
<a name="l00012"></a>00012 
<a name="l00013"></a>00013 <span class="comment">// NWShader logging functions</span>
<a name="l00014"></a>00014 <span class="comment">//</span>
<a name="l00015"></a>00015 <span class="comment">//      This file is part of the NWShader code and is restricted according to</span>
<a name="l00016"></a>00016 <span class="comment">//              the terms of that project. Please check the NWShader license agreement.</span>
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;fstream&gt;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;cstdlib&gt;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;time.h&gt;</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="preprocessor">#ifdef _WIN32</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">    #include &lt;windows.h&gt;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#endif</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;boost/format.hpp&gt;</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="_logger_8hpp.html">Logger.hpp</a>&quot;</span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="keyword">using namespace </span>std;
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="keyword">namespace </span>VoodooShader
<a name="l00034"></a>00034 {
<a name="l00042"></a><a class="code" href="class_voodoo_shader_1_1_logger.html#a8159ba447ccda9b89547f95adfbb90c9">00042</a>         <a class="code" href="_meta_8hpp.html#a64a3622e4b9bb13e6e7a451bfaa84a48">VOODOO_API</a> <a class="code" href="class_voodoo_shader_1_1_logger.html#a8159ba447ccda9b89547f95adfbb90c9" title="Default Ctor, takes the filename.">Logger::Logger</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* filename, <span class="keywordtype">bool</span> append)
<a name="l00043"></a>00043         {
<a name="l00044"></a>00044                 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> flags = ios_base::out;
<a name="l00045"></a>00045                 <span class="keywordflow">if</span> ( append )
<a name="l00046"></a>00046                 {
<a name="l00047"></a>00047                         flags |= ios_base::app;
<a name="l00048"></a>00048                 } <span class="keywordflow">else</span> {
<a name="l00049"></a>00049                         flags |= ios_base::trunc;
<a name="l00050"></a>00050                 }
<a name="l00051"></a>00051                 this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a>.open(filename, flags);
<a name="l00052"></a>00052 
<a name="l00053"></a>00053                 <span class="keywordflow">if</span> ( !this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a>.is_open() )
<a name="l00054"></a>00054                 {
<a name="l00055"></a>00055                         <span class="keywordflow">throw</span> runtime_error(<span class="stringliteral">&quot;Could not open log file!&quot;</span>);
<a name="l00056"></a>00056                 }
<a name="l00057"></a>00057 
<a name="l00058"></a>00058                 this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a8afae3081609613a221f49d186a23697" title="Allows for formatted logging.">Format</a> = <span class="keyword">new</span> <a class="code" href="class_voodoo_shader_1_1_formatter.html" title="Logging Format class.">Formatter</a>(<span class="keyword">this</span>);
<a name="l00059"></a>00059                 this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a6a70a3684a37809f6c7c3c634f917e5f">mLocalTime</a> = <span class="keyword">new</span> tm();
<a name="l00060"></a>00060 
<a name="l00061"></a>00061                 this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a33cbb21507fc3a0f31f462480530aa45" title="Log a basic message.">Log</a>(<span class="stringliteral">&quot;Logger created.\n&quot;</span>);
<a name="l00062"></a>00062         }
<a name="l00063"></a>00063 
<a name="l00064"></a><a class="code" href="class_voodoo_shader_1_1_logger.html#a9463acbdbf8a5468417eb82e99c1d147">00064</a>         <a class="code" href="class_voodoo_shader_1_1_logger.html#a9463acbdbf8a5468417eb82e99c1d147">Logger::~Logger</a>()
<a name="l00065"></a>00065         {
<a name="l00066"></a>00066                 <span class="keywordflow">if</span> ( this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a>.is_open() )
<a name="l00067"></a>00067                 {
<a name="l00068"></a>00068                         this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a>.close();
<a name="l00069"></a>00069                 }
<a name="l00070"></a>00070                 <span class="keywordflow">if</span> ( this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a6a70a3684a37809f6c7c3c634f917e5f">mLocalTime</a> )
<a name="l00071"></a>00071                 {
<a name="l00072"></a>00072                         <span class="keyword">delete</span> this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a6a70a3684a37809f6c7c3c634f917e5f">mLocalTime</a>;
<a name="l00073"></a>00073                 }
<a name="l00074"></a>00074                 <span class="keywordflow">if</span> ( this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a8afae3081609613a221f49d186a23697" title="Allows for formatted logging.">Format</a> )
<a name="l00075"></a>00075                 {
<a name="l00076"></a>00076                         <span class="keyword">delete</span> this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a8afae3081609613a221f49d186a23697" title="Allows for formatted logging.">Format</a>;
<a name="l00077"></a>00077                 }
<a name="l00078"></a>00078         }
<a name="l00079"></a>00079 
<a name="l00083"></a><a class="code" href="class_voodoo_shader_1_1_logger.html#aa354cbb820c64cc4a9c461931a284e25">00083</a>         <a class="code" href="_meta_8hpp.html#a64a3622e4b9bb13e6e7a451bfaa84a48">VOODOO_API</a> <span class="keywordtype">void</span> <a class="code" href="class_voodoo_shader_1_1_logger.html#aa354cbb820c64cc4a9c461931a284e25" title="Write a simple timestamp to the log.">Logger::Timestamp</a>()
<a name="l00084"></a>00084         {
<a name="l00085"></a>00085                 time_t now = time(NULL);
<a name="l00086"></a>00086 <span class="preprocessor">        #ifdef _WIN32</span>
<a name="l00087"></a>00087 <span class="preprocessor"></span>                <span class="keywordflow">if</span> ( localtime_s(this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a6a70a3684a37809f6c7c3c634f917e5f">mLocalTime</a>, &amp;now) == ERROR_SUCCESS )
<a name="l00088"></a>00088 <span class="preprocessor">        #else</span>
<a name="l00089"></a>00089 <span class="preprocessor"></span>                this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a6a70a3684a37809f6c7c3c634f917e5f">mLocalTime</a> = localtime(&amp;now);
<a name="l00090"></a>00090                 <span class="keywordflow">if</span> ( this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a6a70a3684a37809f6c7c3c634f917e5f">mLocalTime</a> != NULL )
<a name="l00091"></a>00091 <span class="preprocessor">        #endif</span>
<a name="l00092"></a>00092 <span class="preprocessor"></span>                {
<a name="l00093"></a>00093                         this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a8afae3081609613a221f49d186a23697" title="Allows for formatted logging.">Format</a>-&gt;<a class="code" href="class_voodoo_shader_1_1_formatter.html#a719f8f5b3f61bf9262da0b2f27cece7e" title="Begins logging a message (passes an initial formatting string).">Record</a>(<span class="stringliteral">&quot;%02d.%02d.%02d :: &quot;</span>)
<a name="l00094"></a>00094                                 .<a class="code" href="class_voodoo_shader_1_1_formatter.html#acd189536db2a1077fe75431b9acf868f" title="Passes an argument to the Format.">With</a>(this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a6a70a3684a37809f6c7c3c634f917e5f">mLocalTime</a>-&gt;tm_hour)
<a name="l00095"></a>00095                                 .<a class="code" href="class_voodoo_shader_1_1_formatter.html#acd189536db2a1077fe75431b9acf868f" title="Passes an argument to the Format.">With</a>(this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a6a70a3684a37809f6c7c3c634f917e5f">mLocalTime</a>-&gt;tm_min )
<a name="l00096"></a>00096                                 .<a class="code" href="class_voodoo_shader_1_1_formatter.html#acd189536db2a1077fe75431b9acf868f" title="Passes an argument to the Format.">With</a>(this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a6a70a3684a37809f6c7c3c634f917e5f">mLocalTime</a>-&gt;tm_sec ).<a class="code" href="class_voodoo_shader_1_1_formatter.html#ae71867d0eb64b74d04030213928cadb5" title="Finalizes a formatted string and prints it to the log.">Done</a>(<span class="keyword">false</span>);
<a name="l00097"></a>00097                 } <span class="keywordflow">else</span> {
<a name="l00098"></a>00098                         this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a> &lt;&lt;<span class="stringliteral">&quot;Unknown  :: &quot;</span>;
<a name="l00099"></a>00099                 }
<a name="l00100"></a>00100         }
<a name="l00101"></a>00101 
<a name="l00102"></a><a class="code" href="class_voodoo_shader_1_1_logger.html#ac08386bce57b832d46849a9c13fb0afc">00102</a>         <a class="code" href="_meta_8hpp.html#a64a3622e4b9bb13e6e7a451bfaa84a48">VOODOO_API</a> <span class="keywordtype">void</span> <a class="code" href="class_voodoo_shader_1_1_logger.html#ac08386bce57b832d46849a9c13fb0afc" title="Sets the internal buffer to a given size.">Logger::SetBufferSize</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bytes)
<a name="l00103"></a>00103         {
<a name="l00104"></a>00104                 this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a>.rdbuf()-&gt;pubsetbuf(0, bytes);
<a name="l00105"></a>00105         }
<a name="l00106"></a>00106 
<a name="l00108"></a><a class="code" href="class_voodoo_shader_1_1_logger.html#a33cbb21507fc3a0f31f462480530aa45">00108</a>         <a class="code" href="_meta_8hpp.html#a64a3622e4b9bb13e6e7a451bfaa84a48">VOODOO_API</a> <span class="keywordtype">void</span> <a class="code" href="class_voodoo_shader_1_1_logger.html#a33cbb21507fc3a0f31f462480530aa45" title="Log a basic message.">Logger::Log</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* msg, <span class="keywordtype">bool</span> timestamp)
<a name="l00109"></a>00109         {
<a name="l00110"></a>00110                 <span class="keywordflow">if</span> ( timestamp )
<a name="l00111"></a>00111                 {
<a name="l00112"></a>00112                         this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#aa354cbb820c64cc4a9c461931a284e25" title="Write a simple timestamp to the log.">Timestamp</a>();
<a name="l00113"></a>00113                 }
<a name="l00114"></a>00114                 this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a> &lt;&lt; msg;
<a name="l00115"></a>00115         }
<a name="l00116"></a>00116 
<a name="l00118"></a><a class="code" href="class_voodoo_shader_1_1_logger.html#a32b56aa850deffc0ffe044d3d16f67d8">00118</a>         <a class="code" href="_meta_8hpp.html#a64a3622e4b9bb13e6e7a451bfaa84a48">VOODOO_API</a> <span class="keywordtype">void</span> <a class="code" href="class_voodoo_shader_1_1_logger.html#a33cbb21507fc3a0f31f462480530aa45" title="Log a basic message.">Logger::Log</a>(<span class="keywordtype">string</span> msg, <span class="keywordtype">bool</span> timestamp)
<a name="l00119"></a>00119         {
<a name="l00120"></a>00120                 <span class="keywordflow">if</span> ( timestamp )
<a name="l00121"></a>00121                 {
<a name="l00122"></a>00122                         this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#aa354cbb820c64cc4a9c461931a284e25" title="Write a simple timestamp to the log.">Timestamp</a>();
<a name="l00123"></a>00123                 }
<a name="l00124"></a>00124                 this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a> &lt;&lt; msg;
<a name="l00125"></a>00125         }
<a name="l00126"></a>00126 
<a name="l00128"></a><a class="code" href="class_voodoo_shader_1_1_logger.html#a22bc194ad823275bcc1d327e700d62e9">00128</a>         <a class="code" href="_meta_8hpp.html#a64a3622e4b9bb13e6e7a451bfaa84a48">VOODOO_API</a> <span class="keywordtype">void</span> <a class="code" href="class_voodoo_shader_1_1_logger.html#a22bc194ad823275bcc1d327e700d62e9" title="Immediately writes all pending data to disk.">Logger::Dump</a>()
<a name="l00129"></a>00129         {
<a name="l00130"></a>00130                 this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a>.flush();
<a name="l00131"></a>00131         }
<a name="l00132"></a>00132 
<a name="l00138"></a><a class="code" href="class_voodoo_shader_1_1_logger.html#addbbf9eda63aa67c5a0ad9dc953d1b98">00138</a>         <a class="code" href="_meta_8hpp.html#a64a3622e4b9bb13e6e7a451bfaa84a48">VOODOO_API</a> <span class="keywordtype">bool</span> <a class="code" href="class_voodoo_shader_1_1_logger.html#addbbf9eda63aa67c5a0ad9dc953d1b98" title="Opens a file for use by this Logger.">Logger::Open</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* filename)
<a name="l00139"></a>00139         {
<a name="l00140"></a>00140                 <span class="keywordflow">if</span> ( this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a>.is_open() )
<a name="l00141"></a>00141                 {
<a name="l00142"></a>00142                         this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a>.close();
<a name="l00143"></a>00143                 }
<a name="l00144"></a>00144 
<a name="l00145"></a>00145                 this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a>.open(filename, ios_base::out|ios_base::trunc);
<a name="l00146"></a>00146 
<a name="l00147"></a>00147                 <span class="keywordflow">if</span> ( this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a>.is_open() )
<a name="l00148"></a>00148                 {
<a name="l00149"></a>00149                         this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a33cbb21507fc3a0f31f462480530aa45" title="Log a basic message.">Log</a>(<span class="stringliteral">&quot;Logger: Log file opened by Logger::Open.\n&quot;</span>);
<a name="l00150"></a>00150                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00151"></a>00151                 } <span class="keywordflow">else</span> {
<a name="l00152"></a>00152                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00153"></a>00153                 }
<a name="l00154"></a>00154         }
<a name="l00155"></a>00155 
<a name="l00157"></a><a class="code" href="class_voodoo_shader_1_1_logger.html#af28f23bb3efa7db2091b8062a6f8a66b">00157</a>         <a class="code" href="_meta_8hpp.html#a64a3622e4b9bb13e6e7a451bfaa84a48">VOODOO_API</a> <span class="keywordtype">void</span> <a class="code" href="class_voodoo_shader_1_1_logger.html#af28f23bb3efa7db2091b8062a6f8a66b" title="Closes the file, if one is open.">Logger::Close</a>()
<a name="l00158"></a>00158         {
<a name="l00159"></a>00159                 <span class="keywordflow">if</span> ( this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a>.is_open() )
<a name="l00160"></a>00160                 {
<a name="l00161"></a>00161                         this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a33cbb21507fc3a0f31f462480530aa45" title="Log a basic message.">Log</a>(<span class="stringliteral">&quot;Logger: Log file closed by Logger::Close.\n&quot;</span>);
<a name="l00162"></a>00162                         this-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#ad1f45d786aa787b9ae68d3b928dcba17">mLogFile</a>.close();
<a name="l00163"></a>00163                 }
<a name="l00164"></a>00164         }
<a name="l00165"></a>00165 
<a name="l00166"></a><a class="code" href="class_voodoo_shader_1_1_formatter.html#a719f8f5b3f61bf9262da0b2f27cece7e">00166</a>         <a class="code" href="_meta_8hpp.html#a64a3622e4b9bb13e6e7a451bfaa84a48">VOODOO_API</a> <a class="code" href="class_voodoo_shader_1_1_formatter.html" title="Logging Format class.">Formatter</a> &amp; <a class="code" href="class_voodoo_shader_1_1_formatter.html#a719f8f5b3f61bf9262da0b2f27cece7e" title="Begins logging a message (passes an initial formatting string).">Formatter::Record</a>(<span class="keywordtype">string</span> fmtString)
<a name="l00167"></a>00167         {
<a name="l00168"></a>00168                 this-&gt;<a class="code" href="class_voodoo_shader_1_1_formatter.html#ae3949edb9f01381b532e17303d91d946" title="Internal Format object.">mFmtObj</a>.parse(fmtString);
<a name="l00169"></a>00169                 <span class="keywordflow">return</span> (*<span class="keyword">this</span>);
<a name="l00170"></a>00170         }
<a name="l00171"></a>00171 
<a name="l00172"></a><a class="code" href="class_voodoo_shader_1_1_formatter.html#ae71867d0eb64b74d04030213928cadb5">00172</a>         <a class="code" href="_meta_8hpp.html#a64a3622e4b9bb13e6e7a451bfaa84a48">VOODOO_API</a> <span class="keywordtype">void</span> <a class="code" href="class_voodoo_shader_1_1_formatter.html#ae71867d0eb64b74d04030213928cadb5" title="Finalizes a formatted string and prints it to the log.">Formatter::Done</a>(<span class="keywordtype">bool</span> timestamp)
<a name="l00173"></a>00173         {
<a name="l00174"></a>00174                 this-&gt;<a class="code" href="class_voodoo_shader_1_1_formatter.html#aec907d7883bb74ef0641f1b7ca2066c8">mParent</a>-&gt;<a class="code" href="class_voodoo_shader_1_1_logger.html#a33cbb21507fc3a0f31f462480530aa45" title="Log a basic message.">Log</a>(this-&gt;<a class="code" href="class_voodoo_shader_1_1_formatter.html#ae3949edb9f01381b532e17303d91d946" title="Internal Format object.">mFmtObj</a>.str(), timestamp);
<a name="l00175"></a>00175         }
<a name="l00176"></a>00176 
<a name="l00177"></a><a class="code" href="class_voodoo_shader_1_1_formatter.html#a36300b3526191c50d36b651d0e65d661">00177</a>         <a class="code" href="_meta_8hpp.html#a64a3622e4b9bb13e6e7a451bfaa84a48">VOODOO_API</a> <a class="code" href="class_voodoo_shader_1_1_formatter.html#a36300b3526191c50d36b651d0e65d661" title="Needs a ctor now.">Formatter::Formatter</a>(<a class="code" href="class_voodoo_shader_1_1_logger.html" title="Logfile management class.">Logger</a> * parent)
<a name="l00178"></a>00178         {
<a name="l00179"></a>00179                 this-&gt;<a class="code" href="class_voodoo_shader_1_1_formatter.html#aec907d7883bb74ef0641f1b7ca2066c8">mParent</a> = parent;
<a name="l00180"></a>00180         }
<a name="l00181"></a>00181 }
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Oct 14 19:58:31 2010 for Voodoo Shader Framework by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
